export var language = {
  "For Loop": {
    prefix: "for",
    body: [
      "for (let index = 0; index < array.length; index++) {",
      "\tconst element = array[index];",
      "\t// Do something",
      "}",
    ],
    description: "For Loop",
  },
  "For-Each Loop": {
    prefix: "foreach",
    body: ["array.forEach(element => {", "\t// Do something", "});"],
    description: "For-Each Loop",
  },
  "For-In Loop": {
    prefix: "forin",
    body: [
      "for (const key in object) {",
      "\tif (Object.hasOwnProperty.call(object, key)) {",
      "\t\tconst element = object[key];",
      "\t\t// Do something",
      "\t}",
      "}",
    ],
    description: "For-In Loop",
  },
  "For-Of Loop": {
    prefix: "forof",
    body: ["for (const iterator} of object) {", "\t// Do something", "}"],
    description: "For-Of Loop",
  },
  "Function Statement": {
    prefix: "function",
    body: ["function name(params) {", "\t// Do something", "}"],
    description: "Function Statement",
  },
  "If Statement": {
    prefix: "if",
    body: ["if (condition) {", "\t// Do something", "}"],
    description: "If Statement",
  },
  "If-Else Statement": {
    prefix: "ifelse",
    body: ["if (condition) {", "\t// Do something", "} else {", "\t", "}"],
    description: "If-Else Statement",
  },
  "New Statement": {
    prefix: "new",
    body: ["const name = new type}(arguments);"],
    description: "New Statement",
  },
  "Switch Statement": {
    prefix: "switch",
    body: [
      "switch (key) {",
      "\tcase value}:",
      "\t\t",
      "\t\tbreak;",
      "",
      "\tdefault:",
      "\t\tbreak;",
      "}",
    ],
    description: "Switch Statement",
  },
  "While Statement": {
    prefix: "while",
    body: ["while (condition) {", "\t// Do something", "}"],
    description: "While Statement",
  },
  "Do-While Statement": {
    prefix: "dowhile",
    body: ["do {", "\t// Do something", "} while (condition);"],
    description: "Do-While Statement",
  },
  "Try-Catch Statement": {
    prefix: "trycatch",
    body: ["try {", "\t// Do something", "} catch (error}) {", "\t", "}"],
    description: "Try-Catch Statement",
  },
  "Function Statement": {
    prefix: "func",
    body: ["function(params) {", "\t// Do something", , "}"],
    description: "Try-Catch Statement",
  },
  Document: {
    prefix: "document",
    body: ["document"],
    description: "Document Statement",
  },
  "Document querySelector": {
    prefix: "querySelector",
    body: ["querySelector"],
    description: "querySelector Statement",
  },
  "Document querySelectorAll": {
    prefix: "querySelectorAll",
    body: ["querySelectorAll"],
    description: "querySelectorAll Statement",
  },
  "Document getElementById": {
    prefix: "getElementById",
    body: ["getElementById"],
    description: "getElementById Statement",
  },
  "Document getElementsByClassName": {
    prefix: "getElementsByClassName",
    body: ["getElementsByClassName"],
    description: "getElementsByClassName Statement",
  },

  "Set Timeout Function": {
    prefix: "settimeout",
    body: ["setTimeout(function() {", "\t// Do something", "}, timeout});"],
    description: "Set Timeout Function",
  },
  "Set Interval Function": {
    prefix: "setinterval",
    body: ["setInterval(function() {", "\t// Do something", "}, interval});"],
    description: "Set Interval Function",
  },
  "Import Statement": {
    prefix: "import",
    body: ['import {  } from "module}";'],
    description: "Import external module",
  },
  "Region Start": {
    prefix: "#region",
    body: ["//#region "],
    description: "Folding Region Start",
  },
  "Region End": {
    prefix: "#endregion",
    body: ["//#endregion"],
    description: "Folding Region End",
  },
  "Log to the console": {
    prefix: "log",
    body: ["console.log($1);"],
    description: "Log to the console",
  },
  "Log warning to console": {
    prefix: "warn",
    body: ["console.warn($1);"],
    description: "Log warning to the console",
  },
  "Log error to console": {
    prefix: "error",
    body: ["console.error($1);"],
    description: "Log error to the console",
  },
  "new Promise": {
    prefix: "newpromise",
    body: ["new Promise((resolve, reject) => {", "\t// Do something", "})"],
    description: "Create a new Promise",
  },
};
